/*
* Copyright (c) 2011 Connection Road.  All rights reserved.
* This program and the accompanying material are made available
* under the terms of the Eclipse Public Licnese v1.0 which is
* available at http://www.eclipse.org/legal/epl-v10.html
*/


using System;
using System.IO;
using System.Xml.Serialization;

namespace CrSyncFilesUtils
{
    /// <summary>
    /// Defines the generic contract for source / destination and location type.
    /// This class already handles path evaulation and validation. If you have a different location type you can override
    /// how your location validates.
    /// </summary>
    public interface ICrSyncLocation
    {

        /// <summary>
        /// The root directory for sync provider
        /// </summary>
        string Path { get; set; }
        

        /// <summary>
        /// A name to be used for metadata and markers
        /// </summary>
        string FileName { get; set; }
        
        /// <summary>
        /// A series of string that uniquely identifies an instance of this location
        /// </summary>
        string UniqueIdentifier { get; set; }

        Guid Guid { get; }
        
        /// <summary>
        /// A full path to the meata data directory. Used for creating sync provider.
        /// </summary>
        string MetaDataDirectory { get; set; }
        
        CrSyncFileLocationTypes LocationType { get; set; }
        
        DriveType DriveType { get; set; }
        

        /// <summary>
        /// Full path to the marker file
        /// </summary>
        string MarkerFilePath { get; }
        

        /// <summary>
        /// Full path to the meta data
        /// </summary>
        string MetaFilePath { get; }

        /// <summary>
        /// Convenience method for validating location
        /// </summary>
        /// <param name="pairInfo"></param>
        /// <param name="pairManager"></param>
        /// <returns></returns>
        CrSyncFileLocationResult Validate(FileSyncPairInfo pairInfo, FileSyncPairManager pairManager);

        /// <summary>
        /// Convenience method for recreating the marker file when deleted.
        /// </summary>
        void CreateMarker();


        /// <summary>
        /// Path display string. Implement this property if you want to have 
        /// a different display representation of the Path property. 
        /// </summary>
        string Location { get; }
       
    }


}
